package com.shop.cereshop.app.dao.coupon;

import com.shop.cereshop.app.page.product.ProductCoupon;
import com.shop.cereshop.app.param.canvas.CanvasCouponParam;
import com.shop.cereshop.commons.domain.tool.CereShopCoupon;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CereShopCouponDAO {
    int deleteByPrimaryKey(Long shopCouponId);

    int insert(CereShopCoupon record);

    int insertSelective(CereShopCoupon record);

    CereShopCoupon selectByPrimaryKey(Long shopCouponId);

    int updateByPrimaryKeySelective(CereShopCoupon record);

    int updateByPrimaryKey(CereShopCoupon record);

    List<ProductCoupon> findByProductId(@Param("productId") Long productId);

    List<ProductCoupon> getShopCoupons(CanvasCouponParam param);

    List<ProductCoupon> findByProductIdAndUserId(@Param("buyerUserId") Long buyerUserId, @Param("productId") Long productId);

    List<ProductCoupon> getShopCouponsByUserId(CanvasCouponParam param);
}